import request from "@/utils/request";

// 查询项目列表
export function listProject(param) {
  return request({
    url: "/project/page",
    method: "get",
    params: param,
  });
}

// 查询项目详情
export function getProject(id) {
  return request({
    url: "/project/selectById",
    method: "get",
    params: {
      id,
    },
  });
}

// 创建项目
export function addProject(data) {
  return request({
    url: "/project/add",
    method: "post",
    data: data,
  });
}

// 修改项目
export function updateProject(data) {
  return request({
    url: "/project/update",
    method: "put",
    data: data,
  });
}

// 删除项目
export function delProject(id) {
  return request({
    url: "/project/delete/" + id,
    method: "delete",
  });
}
